/**
 * 
 */
package com.ambow.dao.impl;

import java.util.List;

import com.ambow.Entity.TextBook;
import com.ambow.dao.TextBookDao;
import com.ambow.utils.BaseDAO;

/**
 * @author Administrator
 *
 */
public class TextBookDaoImpl  implements TextBookDao{
	public List<TextBook>  TextBookQuery(String sql,String[] param){
		
		List<TextBook> list= BaseDAO.query(sql, param);
		return list;
		
	}

	/* (non-Javadoc)
	 * @see com.ambow.dao.TextBookDao#TextBookQueryByOne(java.lang.String, java.lang.String[])
	 */
	@Override
	public TextBook TextBookQueryByOne(Class c,int id) {
		TextBook  textBook=(TextBook) BaseDAO.get(c, id);
		return textBook;
	}

	@Override
	public TextBook queryByHql(String hql, String[] param) {
		return (TextBook) BaseDAO.queryOne(hql, param);
	}

	/* (non-Javadoc)
	 * @see com.ambow.dao.TextBookDao#queryAllBook(java.lang.String)
	 */
	@Override
	public List<TextBook> queryAllBook(String hql) {
		// TODO Auto-generated method stub
		return BaseDAO.queryAll(hql);
	}

	/* (non-Javadoc)
	 * @see com.ambow.dao.TextBookDao#queryBook(java.lang.String)
	 */
	@Override
	public TextBook queryBook(String hql) {
		// TODO Auto-generated method stub
		return (TextBook) BaseDAO.getSingleByHql(hql);
	}
}
